//
//  WJTools.h
//  EBOexchange
//
//  Created by WWJ on 2017/12/27.
//  Copyright © 2017年 ebo. All rights reserved.
//
//#import "MyInfoTools.h"
#import <Foundation/Foundation.h>
//#import "UIImageView+MY.h"
//#import "UIView+Extension.h"
#import "UILabel+CreatLabel.h"
#import "UIColor+Extend.h"
//#import "MeumView.h"
//#import "NSDecimalNumber+Addtion.h"
#import "UIButton+RACCommandSupport.h"
/**com*/
#define kSCALE_WIDTH(w)     (kScreenWidth/375.0*w)
#define kSCALE_HEIGHT(h)    (kScreenHeight/667.0*h)

//#define kNavHeight              (kStatusHeight + 44.0f)
//#define kTabbarHeight           kTabBarHeight
//#define FONT(f)                 [UIFont systemFontOfSize:((kScreenHeight == 667)?f:(kScreenHeight < 667)?(f-1.f):(f*1.2f))]
#define kFONT(s)                [UIFont systemFontOfSize:s]
#define kWeakSelf(weakSelf)  __weak __typeof(&*self)weakSelf = self;
#define kImageName(s)           [UIImage imageNamed:s]

//color
#define kSetColor(s)            [UIColor colorWithHexColorString:s]
#define kWJRedColor             kSetColor(@"FF6054")
//kSetColor(@"b7245a")
#define kTradeGreenColor        kGreenColor
//kSetColor(@"0fad82")
#define kTradeTextColor         kGetColor(74, 80, 90)
#define kWJTextGrayColor          kSetColor(@"919191")
//#define kRedColor             kSetColor(@"ff2923")
#define kGrayColor         [UIColor colorWithRed:0.53f green:0.55f blue:0.56f alpha:1.00f]
#define kBlueColor               kSetColor(@"3AE2FD")
//kSetColor(@"2bb9d6")
#define kTradeGrayColor          kSetColor(@"d2d8de")
#define kTradeUnitColor          kSetColor(@"202833")
#define kTradeYellowColor        [UIColor colorWithRed:0.95f green:0.71f blue:0.07f alpha:1.00f]
#define kTradeWhiteColor         kSetColor(@"ffffff")
#define kTradeLineColor         kSetColor(@"3A4159")
#define kTextColor              kSetColor(@"ffffff")
#define kTextGrayColor             kSetColor(@"656565")
#define kBlockTextColor         kSetColor(@"3c3c3c")
#define kLineColor         kSetColor(@"2e333d")


//语言
#define kSetLanguage(s)         [[Language ShareInstance]getString:s]
@interface WJTools : NSObject
//虚线
+ (void)drawDottedLineInView:(UIView *)view dottedLineWidth:(CGFloat)dottedLineWidth lineGap:(int)gap lineHeight:(CGFloat)lineHeight startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint lineColor:(UIColor *)lineColor;

/**
 判断空字符串
 @param string 字符串
 @return yes为空
 */
+ (BOOL)isBlankString:(NSString *)string;

/**
 自定义小数位
 @param doub 数字
 @param num 保留位数
 @return 返回字符串
 */
+ (NSString *)string:(double)doub fractionDigits:(int)num;

/**
 时间戳转字符串
 @param dateSring 时间戳
 @param format 时间格式
 @return 时间字符串
 */
+ (NSString *)dateFromString:(NSString *)dateSring Format:(NSString *)format;

/**
 二维码

 @param dataString 二维码信息
 @param size 二维码图片大小
 @return 二维码图片
 */
+ (UIImage *)createNonInterpolatedUIImageWithDataString:(NSString *)dataString withSize:(CGFloat) size;

+ (CGSize) boundingRectWithSize:(NSString*) txt Font:(UIFont*) font Size:(CGSize) size;

//富文本
+ (NSMutableAttributedString*)changeLabelWithText:(NSString*)needText withChangeText:(NSString *)text withFont:(UIFont *)font  color:(UIColor *)color ;
+ (BOOL)isEnglishWithNum:(NSString *)string;

+(NSMutableAttributedString*)changeLabelWithText:(NSString*)needText withChangeTextArr:(NSArray  *)textArr withFont:(UIFont *)font  color:(UIColor *)color;


//flv约束
+ (void)addConstraintsWithView:(UIView *)view formats:(NSArray <NSString *> *)vfls views:(NSDictionary *)views;
+ (void)addConstraintsWithView:(UIView *)view metrics:(NSDictionary *)metrics formats:(NSArray <NSString *> *)vfls views:(NSDictionary *)views;
/**
 检测是否是手机号码
 */
+ (BOOL)isMobileNumber:(NSString *)mobile;

+ (void)addConstraintCenterYWithView:(UIView *)view toItem:(UIView *)item1 toItem:(UIView *)item2;

/**
 检测是否是邮箱
 */
+ (BOOL)validationEmail:(NSString *)email;

/**
 6~20位数字、字母、下划线、减号格式校验
 */
+ (BOOL)checkPsw:(NSString *)pswStr;

/**
 6~16位数字格式校验
 */
+ (BOOL)checkBackPsw:(NSString *)pswStr;

/**
 检测银行卡
 */
+ (BOOL) checkCardNo:(NSString*) cardNo;

@end
